import store from '@/store'

export function isButton(keys) {
    let isSuperuser = store.getters.is_superuser
    let userButtons = store.state.user.buttons
    
    if(isSuperuser){
        return true;
    }else if(userButtons && userButtons.includes(keys)){
        return true;
    }else{
        return false;
    }
}
const util={
    isButton,
    page:{
        size:[10,20,30,50],
        limit:10,
        pagerCount:9,
    },
    activeList:[{'value':true,'name':'启用 '},{'value':false,'name':'禁用'}],
    
}
export default util